<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div>p:empty {
      /* color: red; */
      height: 30px;
      border: solid red;
    }
  </style>
</head>

<body>
  <div>
    <p class="ca">p1</p>
    <p class="ca">p2</p>
    <div class="ca">div1</div>
    <p class="ca">p3</p>
    <p class="ca">p4</p>
    <div class="ca">div2</div>
    <p class="ca"></p>
    <p class="ca">p6</p>
    <div class="ca">div3</div>
    <p class="ca">p7</p>
    <p class="ca"></p>
    <div class="ca">div4</div>

  </div>
</body>

</html>